package com.masterclient.app.modules.purchase.contract;

import com.eoner.baselibrary.base.BasePresenter;
import com.eoner.baselibrary.base.BaseView;
import com.eoner.baselibrary.bean.goods.ProductSpecificationData;
import com.eoner.baselibrary.bean.order.ConfirmOrderData;
import com.eoner.baselibrary.bean.purchase.PurchaseProductData;

import java.util.Map;

/**
 * @auther hjian
 * @date 2020/9/22.
 */
public interface PurchaseProductContract {
    interface View extends BaseView{
        void showData(PurchaseProductData data);
        void showFailure(int type, String msg);
        void showSpecificationData(ProductSpecificationData specificationData);
        void successAddCart(Map<String,String> map);
        void confirmOrderSuccess(ConfirmOrderData data, String isCustody);
    }

    abstract static class Presenter extends BasePresenter<PurchaseProductContract.View> {

        @Override
        public void onStart() {}

        public abstract void getData();

        public abstract void getProductSpecification(String product_id);

        public abstract void addCart(String product_id, String num);

        public abstract void confirmOrder(String buy_product, String buy_type, String is_custody);

    }

}
